*-------------------------------------------------------------------------------------------------------------
* ICT
*-------------------------------------------------------------------------------------------------------------


*** Create euklems_num (consistent industry classification to merge on ICT data)
use "replication_data/temporary_files/dataset_temp_1.dta", clear

gen euklems_num=.
replace euklems_num = 1 if jbsic07_cc==1 //jbsic07_cc. straightforward match with nace rev2
replace euklems_num = 1 if jbsic07_cc==2
replace euklems_num = 1 if jbsic07_cc==3
replace euklems_num = 2 if jbsic07_cc==5
replace euklems_num = 2 if jbsic07_cc==6
replace euklems_num = 2 if jbsic07_cc==7
replace euklems_num = 2 if jbsic07_cc==8
replace euklems_num = 2 if jbsic07_cc==9
replace euklems_num = 4 if jbsic07_cc==10
replace euklems_num = 4 if jbsic07_cc==11
replace euklems_num = 4 if jbsic07_cc==12
replace euklems_num = 5 if jbsic07_cc==13
replace euklems_num = 5 if jbsic07_cc==14
replace euklems_num = 5 if jbsic07_cc==15
replace euklems_num = 6 if jbsic07_cc==16
replace euklems_num = 6 if jbsic07_cc==17
replace euklems_num = 6 if jbsic07_cc==18
replace euklems_num = 7 if jbsic07_cc==19
replace euklems_num = 8 if jbsic07_cc==20
replace euklems_num = 8 if jbsic07_cc==21
replace euklems_num = 9 if jbsic07_cc==22
replace euklems_num = 9 if jbsic07_cc==23
replace euklems_num = 10 if jbsic07_cc==24
replace euklems_num = 10 if jbsic07_cc==25
replace euklems_num = 11 if jbsic07_cc==26
replace euklems_num = 11 if jbsic07_cc==27
replace euklems_num = 12 if jbsic07_cc==28
replace euklems_num = 13 if jbsic07_cc==29
replace euklems_num = 13 if jbsic07_cc==30
replace euklems_num = 14 if jbsic07_cc==31
replace euklems_num = 14 if jbsic07_cc==32
replace euklems_num = 14 if jbsic07_cc==33
replace euklems_num = 15 if jbsic07_cc==35
replace euklems_num = 15 if jbsic07_cc==36
replace euklems_num = 15 if jbsic07_cc==37
replace euklems_num = 15 if jbsic07_cc==38
replace euklems_num = 15 if jbsic07_cc==39
replace euklems_num = 16 if jbsic07_cc==41
replace euklems_num = 16 if jbsic07_cc==42
replace euklems_num = 16 if jbsic07_cc==43
replace euklems_num = 18 if jbsic07_cc==45
replace euklems_num = 19 if jbsic07_cc==46
replace euklems_num = 20 if jbsic07_cc==47
replace euklems_num = 22 if jbsic07_cc==49
replace euklems_num = 22 if jbsic07_cc==50
replace euklems_num = 22 if jbsic07_cc==51
replace euklems_num = 22 if jbsic07_cc==52
replace euklems_num = 23 if jbsic07_cc==53
replace euklems_num = 24 if jbsic07_cc==55
replace euklems_num = 24 if jbsic07_cc==56
replace euklems_num = 26 if jbsic07_cc==58
replace euklems_num = 26 if jbsic07_cc==59
replace euklems_num = 26 if jbsic07_cc==60
replace euklems_num = 27 if jbsic07_cc==61
replace euklems_num = 28 if jbsic07_cc==62
replace euklems_num = 28 if jbsic07_cc==63
replace euklems_num = 29 if jbsic07_cc==64
replace euklems_num = 29 if jbsic07_cc==65
replace euklems_num = 29 if jbsic07_cc==66
replace euklems_num = 30 if jbsic07_cc==68
replace euklems_num = 31 if jbsic07_cc==69
replace euklems_num = 31 if jbsic07_cc==70
replace euklems_num = 31 if jbsic07_cc==71
replace euklems_num = 31 if jbsic07_cc==72
replace euklems_num = 31 if jbsic07_cc==73
replace euklems_num = 31 if jbsic07_cc==74
replace euklems_num = 31 if jbsic07_cc==75
replace euklems_num = 31 if jbsic07_cc==77
replace euklems_num = 31 if jbsic07_cc==78
replace euklems_num = 31 if jbsic07_cc==79
replace euklems_num = 31 if jbsic07_cc==80
replace euklems_num = 31 if jbsic07_cc==81
replace euklems_num = 31 if jbsic07_cc==82
replace euklems_num = 33 if jbsic07_cc==84
replace euklems_num = 34 if jbsic07_cc==85
replace euklems_num = 35 if jbsic07_cc==86
replace euklems_num = 35 if jbsic07_cc==87
replace euklems_num = 35 if jbsic07_cc==88
replace euklems_num = 37 if jbsic07_cc==90
replace euklems_num = 37 if jbsic07_cc==91
replace euklems_num = 37 if jbsic07_cc==92
replace euklems_num = 37 if jbsic07_cc==93
replace euklems_num = 38 if jbsic07_cc==94
replace euklems_num = 38 if jbsic07_cc==95
replace euklems_num = 38 if jbsic07_cc==96
replace euklems_num = 38 if jbsic07_cc==97
replace euklems_num = 38 if jbsic07_cc==98
replace euklems_num = 40 if jbsic07_cc==99

mdesc euklems_num


// sic92 for years before 2009. no overlap, no if-sic07-missing necessary.
replace euklems_num =1 if jbsic92==111 	& euklems_num==.
replace euklems_num =1 if jbsic92==112	& euklems_num==.
replace euklems_num =1 if jbsic92==113	& euklems_num==.
replace euklems_num =2 if jbsic92==120	& euklems_num==.
replace euklems_num =1 if jbsic92==121	& euklems_num==.
replace euklems_num =1 if jbsic92==122	& euklems_num==.
replace euklems_num =1 if jbsic92==123	& euklems_num==.
replace euklems_num =1 if jbsic92==124	& euklems_num==.
replace euklems_num =1 if jbsic92==125	& euklems_num==.
replace euklems_num =1 if jbsic92==130	& euklems_num==.
replace euklems_num =. if jbsic92==140	& euklems_num==.
replace euklems_num =1 if jbsic92==141	& euklems_num==.
replace euklems_num =1 if jbsic92==142	& euklems_num==.
replace euklems_num =1 if jbsic92==150	& euklems_num==.
replace euklems_num =1 if jbsic92==201	& euklems_num==.
replace euklems_num =1 if jbsic92==202	& euklems_num==.
replace euklems_num =15 if jbsic92==410	& euklems_num==.
replace euklems_num =1 if jbsic92==500	& euklems_num==.
replace euklems_num =1 if jbsic92==501	& euklems_num==.
replace euklems_num =1 if jbsic92==502	& euklems_num==.
replace euklems_num =34 if jbsic92==802	& euklems_num==.
replace euklems_num =34 if jbsic92==810	& euklems_num==.
replace euklems_num =35 if jbsic92==853	& euklems_num==.
replace euklems_num =2 if jbsic92==1000	& euklems_num==.
replace euklems_num =2 if jbsic92==1010	& euklems_num==.
replace euklems_num =2 if jbsic92==1020	& euklems_num==.
replace euklems_num =2 if jbsic92==1030	& euklems_num==.
replace euklems_num =2 if jbsic92==1100	& euklems_num==.
replace euklems_num =2 if jbsic92==1110	& euklems_num==.
replace euklems_num =2 if jbsic92==1120	& euklems_num==.
replace euklems_num =2 if jbsic92==1400	& euklems_num==.
replace euklems_num =2 if jbsic92==1410	& euklems_num==.
replace euklems_num =2 if jbsic92==1411	& euklems_num==.
replace euklems_num =2 if jbsic92==1412	& euklems_num==.
replace euklems_num =2 if jbsic92==1421	& euklems_num==.
replace euklems_num =2 if jbsic92==1422	& euklems_num==.
replace euklems_num =2 if jbsic92==1430	& euklems_num==.
replace euklems_num =2 if jbsic92==1450	& euklems_num==.
replace euklems_num =4 if jbsic92==1500	& euklems_num==.
replace euklems_num =4 if jbsic92==1510	& euklems_num==.
replace euklems_num =4 if jbsic92==1511	& euklems_num==.
replace euklems_num =4 if jbsic92==1512	& euklems_num==.
replace euklems_num =4 if jbsic92==1513	& euklems_num==.
replace euklems_num =4 if jbsic92==1520	& euklems_num==.
replace euklems_num =4 if jbsic92==1526	& euklems_num==.
replace euklems_num =4 if jbsic92==1530	& euklems_num==.
replace euklems_num =4 if jbsic92==1531	& euklems_num==.
replace euklems_num =4 if jbsic92==1532	& euklems_num==.
replace euklems_num =4 if jbsic92==1533	& euklems_num==.
replace euklems_num =4 if jbsic92==1540	& euklems_num==.
replace euklems_num =4 if jbsic92==1541	& euklems_num==.
replace euklems_num =4 if jbsic92==1542	& euklems_num==.
replace euklems_num =4 if jbsic92==1543	& euklems_num==.
replace euklems_num =4 if jbsic92==1550	& euklems_num==.
replace euklems_num =4 if jbsic92==1551	& euklems_num==.
replace euklems_num =4 if jbsic92==1552	& euklems_num==.
replace euklems_num =4 if jbsic92==1553	& euklems_num==.
replace euklems_num =4 if jbsic92==1561	& euklems_num==.
replace euklems_num =4 if jbsic92==1570	& euklems_num==.
replace euklems_num =4 if jbsic92==1571	& euklems_num==.
replace euklems_num =4 if jbsic92==1580	& euklems_num==.
replace euklems_num =4 if jbsic92==1581	& euklems_num==.
replace euklems_num =4 if jbsic92==1582	& euklems_num==.
replace euklems_num =4 if jbsic92==1583	& euklems_num==.
replace euklems_num =4 if jbsic92==1584	& euklems_num==.
replace euklems_num =4 if jbsic92==1585	& euklems_num==.
replace euklems_num =4 if jbsic92==1586	& euklems_num==.
replace euklems_num =4 if jbsic92==1587	& euklems_num==.
replace euklems_num =4 if jbsic92==1588	& euklems_num==.
replace euklems_num =4 if jbsic92==1589	& euklems_num==.
replace euklems_num =4 if jbsic92==1590	& euklems_num==.
replace euklems_num =4 if jbsic92==1591	& euklems_num==.
replace euklems_num =4 if jbsic92==1593	& euklems_num==.
replace euklems_num =4 if jbsic92==1594	& euklems_num==.
replace euklems_num =4 if jbsic92==1596	& euklems_num==.
replace euklems_num =4 if jbsic92==1597	& euklems_num==.
replace euklems_num =4 if jbsic92==1598	& euklems_num==.
replace euklems_num =4 if jbsic92==1600	& euklems_num==.
replace euklems_num =5 if jbsic92==1700	& euklems_num==.
replace euklems_num =5 if jbsic92==1710	& euklems_num==.
replace euklems_num =5 if jbsic92==1711	& euklems_num==.
replace euklems_num =5 if jbsic92==1712	& euklems_num==.
replace euklems_num =5 if jbsic92==1715	& euklems_num==.
replace euklems_num =5 if jbsic92==1716	& euklems_num==.
replace euklems_num =5 if jbsic92==1717	& euklems_num==.
replace euklems_num =5 if jbsic92==1720	& euklems_num==.
replace euklems_num =5 if jbsic92==1721	& euklems_num==.
replace euklems_num =5 if jbsic92==1722	& euklems_num==.
replace euklems_num =5 if jbsic92==1725	& euklems_num==.
replace euklems_num =5 if jbsic92==1730	& euklems_num==.
replace euklems_num =5 if jbsic92==1740	& euklems_num==.
replace euklems_num =5 if jbsic92==1743	& euklems_num==.
replace euklems_num =5 if jbsic92==1750	& euklems_num==.
replace euklems_num =5 if jbsic92==1751	& euklems_num==.
replace euklems_num =5 if jbsic92==1752	& euklems_num==.
replace euklems_num =5 if jbsic92==1754	& euklems_num==.
replace euklems_num =5 if jbsic92==1760	& euklems_num==.
replace euklems_num =5 if jbsic92==1770	& euklems_num==.
replace euklems_num =5 if jbsic92==1771	& euklems_num==.
replace euklems_num =5 if jbsic92==1772	& euklems_num==.
replace euklems_num =5 if jbsic92==1800	& euklems_num==.
replace euklems_num =5 if jbsic92==1810	& euklems_num==.
replace euklems_num =5 if jbsic92==1820	& euklems_num==.
replace euklems_num =5 if jbsic92==1821	& euklems_num==.
replace euklems_num =5 if jbsic92==1822	& euklems_num==.
replace euklems_num =5 if jbsic92==1823	& euklems_num==.
replace euklems_num =5 if jbsic92==1824	& euklems_num==.
replace euklems_num =5 if jbsic92==1900	& euklems_num==.
replace euklems_num =5 if jbsic92==1910	& euklems_num==.
replace euklems_num =5 if jbsic92==1920	& euklems_num==.
replace euklems_num =5 if jbsic92==1930	& euklems_num==.
replace euklems_num =6 if jbsic92==2000	& euklems_num==.
replace euklems_num =6 if jbsic92==2010	& euklems_num==.
replace euklems_num =6 if jbsic92==2020	& euklems_num==.
replace euklems_num =6 if jbsic92==2030	& euklems_num==.
replace euklems_num =6 if jbsic92==2040	& euklems_num==.
replace euklems_num =6 if jbsic92==2050	& euklems_num==.
replace euklems_num =6 if jbsic92==2051	& euklems_num==.
replace euklems_num =6 if jbsic92==2052	& euklems_num==.
replace euklems_num =6 if jbsic92==2100	& euklems_num==.
replace euklems_num =6 if jbsic92==2110	& euklems_num==.
replace euklems_num =6 if jbsic92==2111	& euklems_num==.
replace euklems_num =6 if jbsic92==2112	& euklems_num==.
replace euklems_num =6 if jbsic92==2120	& euklems_num==.
replace euklems_num =6 if jbsic92==2121	& euklems_num==.
replace euklems_num =6 if jbsic92==2122	& euklems_num==.
replace euklems_num =6 if jbsic92==2123	& euklems_num==.
replace euklems_num =6 if jbsic92==2124	& euklems_num==.
replace euklems_num =6 if jbsic92==2125	& euklems_num==.
replace euklems_num =6 if jbsic92==2200	& euklems_num==.
replace euklems_num =6 if jbsic92==2210	& euklems_num==.
replace euklems_num =26 if jbsic92==2211	& euklems_num==.
replace euklems_num =26 if jbsic92==2212	& euklems_num==.
replace euklems_num =26 if jbsic92==2213	& euklems_num==.
replace euklems_num =26 if jbsic92==2214	& euklems_num==.
replace euklems_num =26 if jbsic92==2215	& euklems_num==.
replace euklems_num =26 if jbsic92==2220	& euklems_num==.
replace euklems_num =26 if jbsic92==2221	& euklems_num==.
replace euklems_num =26 if jbsic92==2222	& euklems_num==.
replace euklems_num =26 if jbsic92==2223	& euklems_num==.
replace euklems_num =26 if jbsic92==2224	& euklems_num==.
replace euklems_num =26 if jbsic92==2225	& euklems_num==.
replace euklems_num =26 if jbsic92==2230	& euklems_num==.
replace euklems_num =26 if jbsic92==2231	& euklems_num==.
replace euklems_num =26 if jbsic92==2233	& euklems_num==.
replace euklems_num =7 if jbsic92==2310	& euklems_num==.
replace euklems_num =7 if jbsic92==2320	& euklems_num==.
replace euklems_num =7 if jbsic92==2330	& euklems_num==.
replace euklems_num =8 if jbsic92==2400	& euklems_num==.
replace euklems_num =8 if jbsic92==2410	& euklems_num==.
replace euklems_num =8 if jbsic92==2411	& euklems_num==.
replace euklems_num =8 if jbsic92==2412	& euklems_num==.
replace euklems_num =8 if jbsic92==2413	& euklems_num==.
replace euklems_num =8 if jbsic92==2414	& euklems_num==.
replace euklems_num =8 if jbsic92==2415	& euklems_num==.
replace euklems_num =8 if jbsic92==2416	& euklems_num==.
replace euklems_num =8 if jbsic92==2417	& euklems_num==.
replace euklems_num =8 if jbsic92==2420	& euklems_num==.
replace euklems_num =8 if jbsic92==2421	& euklems_num==.
replace euklems_num =8 if jbsic92==2424	& euklems_num==.
replace euklems_num =8 if jbsic92==2430	& euklems_num==.
replace euklems_num =8 if jbsic92==2437	& euklems_num==.
replace euklems_num =8 if jbsic92==2440	& euklems_num==.
replace euklems_num =8 if jbsic92==2441	& euklems_num==.
replace euklems_num =8 if jbsic92==2442	& euklems_num==.
replace euklems_num =8 if jbsic92==2450	& euklems_num==.
replace euklems_num =8 if jbsic92==2451	& euklems_num==.
replace euklems_num =8 if jbsic92==2452	& euklems_num==.
replace euklems_num =8 if jbsic92==2460	& euklems_num==.
replace euklems_num =8 if jbsic92==2461	& euklems_num==.
replace euklems_num =8 if jbsic92==2462	& euklems_num==.
replace euklems_num =8 if jbsic92==2463	& euklems_num==.
replace euklems_num =8 if jbsic92==2464	& euklems_num==.
replace euklems_num =8 if jbsic92==2465	& euklems_num==.
replace euklems_num =8 if jbsic92==2466	& euklems_num==.
replace euklems_num =8 if jbsic92==2470	& euklems_num==.
replace euklems_num =9 if jbsic92==2500	& euklems_num==.
replace euklems_num =9 if jbsic92==2510	& euklems_num==.
replace euklems_num =9 if jbsic92==2511	& euklems_num==.
replace euklems_num =9 if jbsic92==2513	& euklems_num==.
replace euklems_num =9 if jbsic92==2514	& euklems_num==.
replace euklems_num =9 if jbsic92==2520	& euklems_num==.
replace euklems_num =9 if jbsic92==2521	& euklems_num==.
replace euklems_num =9 if jbsic92==2522	& euklems_num==.
replace euklems_num =9 if jbsic92==2523	& euklems_num==.
replace euklems_num =9 if jbsic92==2524	& euklems_num==.
replace euklems_num =9 if jbsic92==2560	& euklems_num==.
replace euklems_num =9 if jbsic92==2600	& euklems_num==.
replace euklems_num =9 if jbsic92==2610	& euklems_num==.
replace euklems_num =9 if jbsic92==2611	& euklems_num==.
replace euklems_num =9 if jbsic92==2612	& euklems_num==.
replace euklems_num =9 if jbsic92==2613	& euklems_num==.
replace euklems_num =9 if jbsic92==2614	& euklems_num==.
replace euklems_num =9 if jbsic92==2615	& euklems_num==.
replace euklems_num =9 if jbsic92==2620	& euklems_num==.
replace euklems_num =9 if jbsic92==2621	& euklems_num==.
replace euklems_num =9 if jbsic92==2622	& euklems_num==.
replace euklems_num =9 if jbsic92==2623	& euklems_num==.
replace euklems_num =9 if jbsic92==2625	& euklems_num==.
replace euklems_num =9 if jbsic92==2626	& euklems_num==.
replace euklems_num =9 if jbsic92==2630	& euklems_num==.
replace euklems_num =9 if jbsic92==2640	& euklems_num==.
replace euklems_num =9 if jbsic92==2650	& euklems_num==.
replace euklems_num =9 if jbsic92==2651	& euklems_num==.
replace euklems_num =9 if jbsic92==2653	& euklems_num==.
replace euklems_num =9 if jbsic92==2660	& euklems_num==.
replace euklems_num =9 if jbsic92==2661	& euklems_num==.
replace euklems_num =9 if jbsic92==2662	& euklems_num==.
replace euklems_num =9 if jbsic92==2663	& euklems_num==.
replace euklems_num =9 if jbsic92==2665	& euklems_num==.
replace euklems_num =9 if jbsic92==2666	& euklems_num==.
replace euklems_num =9 if jbsic92==2670	& euklems_num==.
replace euklems_num =9 if jbsic92==2680	& euklems_num==.
replace euklems_num =9 if jbsic92==2681	& euklems_num==.
replace euklems_num =9 if jbsic92==2682	& euklems_num==.
replace euklems_num =10 if jbsic92==2700	& euklems_num==.
replace euklems_num =10 if jbsic92==2710	& euklems_num==.
replace euklems_num =10 if jbsic92==2720	& euklems_num==.
replace euklems_num =10 if jbsic92==2721	& euklems_num==.
replace euklems_num =10 if jbsic92==2722	& euklems_num==.
replace euklems_num =10 if jbsic92==2724	& euklems_num==.
replace euklems_num =10 if jbsic92==2731	& euklems_num==.
replace euklems_num =10 if jbsic92==2732	& euklems_num==.
replace euklems_num =10 if jbsic92==2733	& euklems_num==.
replace euklems_num =10 if jbsic92==2734	& euklems_num==.
replace euklems_num =10 if jbsic92==2740	& euklems_num==.
replace euklems_num =10 if jbsic92==2741	& euklems_num==.
replace euklems_num =10 if jbsic92==2742	& euklems_num==.
replace euklems_num =10 if jbsic92==2743	& euklems_num==.
replace euklems_num =10 if jbsic92==2744	& euklems_num==.
replace euklems_num =10 if jbsic92==2745	& euklems_num==.
replace euklems_num =10 if jbsic92==2750	& euklems_num==.
replace euklems_num =10 if jbsic92==2751	& euklems_num==.
replace euklems_num =10 if jbsic92==2752	& euklems_num==.
replace euklems_num =10 if jbsic92==2753	& euklems_num==.
replace euklems_num =10 if jbsic92==2754	& euklems_num==.
replace euklems_num =10 if jbsic92==2800	& euklems_num==.
replace euklems_num =10 if jbsic92==2810	& euklems_num==.
replace euklems_num =10 if jbsic92==2811	& euklems_num==.
replace euklems_num =10 if jbsic92==2812	& euklems_num==.
replace euklems_num =10 if jbsic92==2820	& euklems_num==.
replace euklems_num =10 if jbsic92==2821	& euklems_num==.
replace euklems_num =10 if jbsic92==2822	& euklems_num==.
replace euklems_num =10 if jbsic92==2830	& euklems_num==.
replace euklems_num =10 if jbsic92==2840	& euklems_num==.
replace euklems_num =10 if jbsic92==2850	& euklems_num==.
replace euklems_num =10 if jbsic92==2851	& euklems_num==.
replace euklems_num =10 if jbsic92==2852	& euklems_num==.
replace euklems_num =10 if jbsic92==2860	& euklems_num==.
replace euklems_num =10 if jbsic92==2861	& euklems_num==.
replace euklems_num =10 if jbsic92==2862	& euklems_num==.
replace euklems_num =10 if jbsic92==2863	& euklems_num==.
replace euklems_num =10 if jbsic92==2870	& euklems_num==.
replace euklems_num =10 if jbsic92==2871	& euklems_num==.
replace euklems_num =10 if jbsic92==2872	& euklems_num==.
replace euklems_num =10 if jbsic92==2873	& euklems_num==.
replace euklems_num =10 if jbsic92==2874	& euklems_num==.
replace euklems_num =10 if jbsic92==2875	& euklems_num==.
replace euklems_num =12 if jbsic92==2900	& euklems_num==.
replace euklems_num =12 if jbsic92==2910	& euklems_num==.
replace euklems_num =12 if jbsic92==2911	& euklems_num==.
replace euklems_num =12 if jbsic92==2912	& euklems_num==.
replace euklems_num =12 if jbsic92==2913	& euklems_num==.
replace euklems_num =12 if jbsic92==2914	& euklems_num==.
replace euklems_num =12 if jbsic92==2920	& euklems_num==.
replace euklems_num =12 if jbsic92==2921	& euklems_num==.
replace euklems_num =12 if jbsic92==2922	& euklems_num==.
replace euklems_num =12 if jbsic92==2923	& euklems_num==.
replace euklems_num =12 if jbsic92==2924	& euklems_num==.
replace euklems_num =12 if jbsic92==2930	& euklems_num==.
replace euklems_num =12 if jbsic92==2931	& euklems_num==.
replace euklems_num =12 if jbsic92==2932	& euklems_num==.
replace euklems_num =12 if jbsic92==2940	& euklems_num==.
replace euklems_num =12 if jbsic92==2941	& euklems_num==.
replace euklems_num =12 if jbsic92==2950	& euklems_num==.
replace euklems_num =12 if jbsic92==2951	& euklems_num==.
replace euklems_num =12 if jbsic92==2952	& euklems_num==.
replace euklems_num =12 if jbsic92==2953	& euklems_num==.
replace euklems_num =12 if jbsic92==2954	& euklems_num==.
replace euklems_num =12 if jbsic92==2955	& euklems_num==.
replace euklems_num =12 if jbsic92==2956	& euklems_num==.
replace euklems_num =12 if jbsic92==2960	& euklems_num==.
replace euklems_num =12 if jbsic92==2970	& euklems_num==.
replace euklems_num =12 if jbsic92==2971	& euklems_num==.
replace euklems_num =12 if jbsic92==2972	& euklems_num==.
replace euklems_num =11 if jbsic92==3000	& euklems_num==.
replace euklems_num =11 if jbsic92==3001	& euklems_num==.
replace euklems_num =11 if jbsic92==3002	& euklems_num==.
replace euklems_num =11 if jbsic92==3021	& euklems_num==.
replace euklems_num =11 if jbsic92==3100	& euklems_num==.
replace euklems_num =11 if jbsic92==3110	& euklems_num==.
replace euklems_num =11 if jbsic92==3113	& euklems_num==.
replace euklems_num =11 if jbsic92==3120	& euklems_num==.
replace euklems_num =11 if jbsic92==3130	& euklems_num==.
replace euklems_num =11 if jbsic92==3140	& euklems_num==.
replace euklems_num =11 if jbsic92==3150	& euklems_num==.
replace euklems_num =11 if jbsic92==3160	& euklems_num==.
replace euklems_num =11 if jbsic92==3161	& euklems_num==.
replace euklems_num =11 if jbsic92==3162	& euklems_num==.
replace euklems_num =11 if jbsic92==3200	& euklems_num==.
replace euklems_num =11 if jbsic92==3210	& euklems_num==.
replace euklems_num =11 if jbsic92==3220	& euklems_num==.
replace euklems_num =11 if jbsic92==3230	& euklems_num==.
replace euklems_num =11 if jbsic92==3284	& euklems_num==.
replace euklems_num =11 if jbsic92==3300	& euklems_num==.
replace euklems_num =11 if jbsic92==3301	& euklems_num==.
replace euklems_num =11 if jbsic92==3310	& euklems_num==.
replace euklems_num =11 if jbsic92==3320	& euklems_num==.
replace euklems_num =11 if jbsic92==3330	& euklems_num==.
replace euklems_num =11 if jbsic92==3340	& euklems_num==.
replace euklems_num =11 if jbsic92==3341	& euklems_num==.
replace euklems_num =11 if jbsic92==3343	& euklems_num==.
replace euklems_num =11 if jbsic92==3350	& euklems_num==.
replace euklems_num =13 if jbsic92==3400	& euklems_num==.
replace euklems_num =13 if jbsic92==3410	& euklems_num==.
replace euklems_num =13 if jbsic92==3420	& euklems_num==.
replace euklems_num =13 if jbsic92==3421	& euklems_num==.
replace euklems_num =13 if jbsic92==3430	& euklems_num==.
replace euklems_num =13 if jbsic92==3510	& euklems_num==.
replace euklems_num =13 if jbsic92==3511	& euklems_num==.
replace euklems_num =13 if jbsic92==3512	& euklems_num==.
replace euklems_num =13 if jbsic92==3520	& euklems_num==.
replace euklems_num =13 if jbsic92==3530	& euklems_num==.
replace euklems_num =13 if jbsic92==3541	& euklems_num==.
replace euklems_num =13 if jbsic92==3542	& euklems_num==.
replace euklems_num =13 if jbsic92==3543	& euklems_num==.
replace euklems_num =13 if jbsic92==3550	& euklems_num==.
replace euklems_num =14 if jbsic92==3600	& euklems_num==.
replace euklems_num =14 if jbsic92==3610	& euklems_num==.
replace euklems_num =14 if jbsic92==3611	& euklems_num==.
replace euklems_num =14 if jbsic92==3612	& euklems_num==.
replace euklems_num =14 if jbsic92==3613	& euklems_num==.
replace euklems_num =14 if jbsic92==3614	& euklems_num==.
replace euklems_num =14 if jbsic92==3615	& euklems_num==.
replace euklems_num =14 if jbsic92==3621	& euklems_num==.
replace euklems_num =14 if jbsic92==3622	& euklems_num==.
replace euklems_num =14 if jbsic92==3630	& euklems_num==.
replace euklems_num =14 if jbsic92==3640	& euklems_num==.
replace euklems_num =14 if jbsic92==3650	& euklems_num==.
replace euklems_num =14 if jbsic92==3652	& euklems_num==.
replace euklems_num =14 if jbsic92==3660	& euklems_num==.
replace euklems_num =14 if jbsic92==3661	& euklems_num==.
replace euklems_num =14 if jbsic92==3662	& euklems_num==.
replace euklems_num =14 if jbsic92==3663	& euklems_num==.
replace euklems_num =15 if jbsic92==3700	& euklems_num==.
replace euklems_num =15 if jbsic92==3710	& euklems_num==.
replace euklems_num =15 if jbsic92==3720	& euklems_num==.
replace euklems_num =15 if jbsic92==4000	& euklems_num==.
replace euklems_num =15 if jbsic92==4010	& euklems_num==.
replace euklems_num =15 if jbsic92==4012	& euklems_num==.
replace euklems_num =15 if jbsic92==4020	& euklems_num==.
replace euklems_num =15 if jbsic92==4030	& euklems_num==.
replace euklems_num =15 if jbsic92==4100	& euklems_num==.
replace euklems_num =15 if jbsic92==4248	& euklems_num==.
replace euklems_num =16 if jbsic92==4500	& euklems_num==.
replace euklems_num =16 if jbsic92==4510	& euklems_num==.
replace euklems_num =16 if jbsic92==4511	& euklems_num==.
replace euklems_num =16 if jbsic92==4512	& euklems_num==.
replace euklems_num =16 if jbsic92==4520	& euklems_num==.
replace euklems_num =16 if jbsic92==4521	& euklems_num==.
replace euklems_num =16 if jbsic92==4522	& euklems_num==.
replace euklems_num =16 if jbsic92==4523	& euklems_num==.
replace euklems_num =16 if jbsic92==4524	& euklems_num==.
replace euklems_num =16 if jbsic92==4525	& euklems_num==.
replace euklems_num =16 if jbsic92==4530	& euklems_num==.
replace euklems_num =16 if jbsic92==4531	& euklems_num==.
replace euklems_num =16 if jbsic92==4532	& euklems_num==.
replace euklems_num =16 if jbsic92==4533	& euklems_num==.
replace euklems_num =16 if jbsic92==4534	& euklems_num==.
replace euklems_num =16 if jbsic92==4540	& euklems_num==.
replace euklems_num =16 if jbsic92==4541	& euklems_num==.
replace euklems_num =16 if jbsic92==4542	& euklems_num==.
replace euklems_num =16 if jbsic92==4543	& euklems_num==.
replace euklems_num =16 if jbsic92==4544	& euklems_num==.
replace euklems_num =16 if jbsic92==4545	& euklems_num==.
replace euklems_num =16 if jbsic92==4550	& euklems_num==.
replace euklems_num =16 if jbsic92==4630	& euklems_num==.
replace euklems_num =16 if jbsic92==4754	& euklems_num==.
replace euklems_num =16 if jbsic92==4812	& euklems_num==.
replace euklems_num =18 if jbsic92==5000	& euklems_num==.
replace euklems_num =18 if jbsic92==5010	& euklems_num==.
replace euklems_num =18 if jbsic92==5020	& euklems_num==.
replace euklems_num =18 if jbsic92==5030	& euklems_num==.
replace euklems_num =18 if jbsic92==5040	& euklems_num==.
replace euklems_num =18 if jbsic92==5050	& euklems_num==.
replace euklems_num =19 if jbsic92==5100	& euklems_num==.
replace euklems_num =19 if jbsic92==5110	& euklems_num==.
replace euklems_num =19 if jbsic92==5111	& euklems_num==.
replace euklems_num =19 if jbsic92==5112	& euklems_num==.
replace euklems_num =19 if jbsic92==5113	& euklems_num==.
replace euklems_num =19 if jbsic92==5114	& euklems_num==.
replace euklems_num =19 if jbsic92==5115	& euklems_num==.
replace euklems_num =19 if jbsic92==5116	& euklems_num==.
replace euklems_num =19 if jbsic92==5117	& euklems_num==.
replace euklems_num =19 if jbsic92==5118	& euklems_num==.
replace euklems_num =19 if jbsic92==5119	& euklems_num==.
replace euklems_num =19 if jbsic92==5120	& euklems_num==.
replace euklems_num =19 if jbsic92==5121	& euklems_num==.
replace euklems_num =19 if jbsic92==5122	& euklems_num==.
replace euklems_num =19 if jbsic92==5123	& euklems_num==.
replace euklems_num =19 if jbsic92==5130	& euklems_num==.
replace euklems_num =19 if jbsic92==5131	& euklems_num==.
replace euklems_num =19 if jbsic92==5132	& euklems_num==.
replace euklems_num =19 if jbsic92==5133	& euklems_num==.
replace euklems_num =19 if jbsic92==5134	& euklems_num==.
replace euklems_num =19 if jbsic92==5135	& euklems_num==.
replace euklems_num =19 if jbsic92==5136	& euklems_num==.
replace euklems_num =19 if jbsic92==5137	& euklems_num==.
replace euklems_num =19 if jbsic92==5138	& euklems_num==.
replace euklems_num =19 if jbsic92==5139	& euklems_num==.
replace euklems_num =19 if jbsic92==5140	& euklems_num==.
replace euklems_num =19 if jbsic92==5141	& euklems_num==.
replace euklems_num =19 if jbsic92==5142	& euklems_num==.
replace euklems_num =19 if jbsic92==5143	& euklems_num==.
replace euklems_num =19 if jbsic92==5144	& euklems_num==.
replace euklems_num =19 if jbsic92==5145	& euklems_num==.
replace euklems_num =19 if jbsic92==5146	& euklems_num==.
replace euklems_num =19 if jbsic92==5147	& euklems_num==.
replace euklems_num =19 if jbsic92==5150	& euklems_num==.
replace euklems_num =19 if jbsic92==5151	& euklems_num==.
replace euklems_num =19 if jbsic92==5152	& euklems_num==.
replace euklems_num =19 if jbsic92==5153	& euklems_num==.
replace euklems_num =19 if jbsic92==5154	& euklems_num==.
replace euklems_num =19 if jbsic92==5155	& euklems_num==.
replace euklems_num =19 if jbsic92==5156	& euklems_num==.
replace euklems_num =19 if jbsic92==5157	& euklems_num==.
replace euklems_num =19 if jbsic92==5160	& euklems_num==.
replace euklems_num =19 if jbsic92==5161	& euklems_num==.
replace euklems_num =19 if jbsic92==5162	& euklems_num==.
replace euklems_num =19 if jbsic92==5163	& euklems_num==.
replace euklems_num =19 if jbsic92==5164	& euklems_num==.
replace euklems_num =19 if jbsic92==5165	& euklems_num==.
replace euklems_num =19 if jbsic92==5166	& euklems_num==.
replace euklems_num =19 if jbsic92==5170	& euklems_num==.
replace euklems_num =19 if jbsic92==5187	& euklems_num==.
replace euklems_num =19 if jbsic92==5190	& euklems_num==.
replace euklems_num =20 if jbsic92==5200	& euklems_num==.
replace euklems_num =20 if jbsic92==5210	& euklems_num==.
replace euklems_num =20 if jbsic92==5211	& euklems_num==.
replace euklems_num =20 if jbsic92==5212	& euklems_num==.
replace euklems_num =20 if jbsic92==5217	& euklems_num==.
replace euklems_num =20 if jbsic92==5220	& euklems_num==.
replace euklems_num =20 if jbsic92==5221	& euklems_num==.
replace euklems_num =20 if jbsic92==5222	& euklems_num==.
replace euklems_num =20 if jbsic92==5223	& euklems_num==.
replace euklems_num =20 if jbsic92==5224	& euklems_num==.
replace euklems_num =20 if jbsic92==5225	& euklems_num==.
replace euklems_num =20 if jbsic92==5226	& euklems_num==.
replace euklems_num =20 if jbsic92==5227	& euklems_num==.
replace euklems_num =20 if jbsic92==5230	& euklems_num==.
replace euklems_num =20 if jbsic92==5231	& euklems_num==.
replace euklems_num =20 if jbsic92==5232	& euklems_num==.
replace euklems_num =20 if jbsic92==5233	& euklems_num==.
replace euklems_num =20 if jbsic92==5240	& euklems_num==.
replace euklems_num =20 if jbsic92==5241	& euklems_num==.
replace euklems_num =20 if jbsic92==5242	& euklems_num==.
replace euklems_num =20 if jbsic92==5243	& euklems_num==.
replace euklems_num =20 if jbsic92==5244	& euklems_num==.
replace euklems_num =20 if jbsic92==5245	& euklems_num==.
replace euklems_num =20 if jbsic92==5246	& euklems_num==.
replace euklems_num =20 if jbsic92==5247	& euklems_num==.
replace euklems_num =20 if jbsic92==5248	& euklems_num==.
replace euklems_num =20 if jbsic92==5250	& euklems_num==.
replace euklems_num =20 if jbsic92==5252	& euklems_num==.
replace euklems_num =20 if jbsic92==5260	& euklems_num==.
replace euklems_num =20 if jbsic92==5261	& euklems_num==.
replace euklems_num =20 if jbsic92==5262	& euklems_num==.
replace euklems_num =20 if jbsic92==5263	& euklems_num==.
replace euklems_num =20 if jbsic92==5270	& euklems_num==.
replace euklems_num =20 if jbsic92==5271	& euklems_num==.
replace euklems_num =20 if jbsic92==5272	& euklems_num==.
replace euklems_num =20 if jbsic92==5273	& euklems_num==.
replace euklems_num =20 if jbsic92==5274	& euklems_num==.
replace euklems_num =20 if jbsic92==5333	& euklems_num==.
replace euklems_num =20 if jbsic92==5420	& euklems_num==.
replace euklems_num =20 if jbsic92==5450	& euklems_num==.
replace euklems_num =24 if jbsic92==5500	& euklems_num==.
replace euklems_num =24 if jbsic92==5510	& euklems_num==.
replace euklems_num =24 if jbsic92==5511	& euklems_num==.
replace euklems_num =24 if jbsic92==5512	& euklems_num==.
replace euklems_num =24 if jbsic92==5520	& euklems_num==.
replace euklems_num =24 if jbsic92==5521	& euklems_num==.
replace euklems_num =24 if jbsic92==5522	& euklems_num==.
replace euklems_num =24 if jbsic92==5523	& euklems_num==.
replace euklems_num =24 if jbsic92==5530	& euklems_num==.
replace euklems_num =24 if jbsic92==5531	& euklems_num==.
replace euklems_num =24 if jbsic92==5532	& euklems_num==.
replace euklems_num =24 if jbsic92==5533	& euklems_num==.
replace euklems_num =24 if jbsic92==5540	& euklems_num==.
replace euklems_num =24 if jbsic92==5542	& euklems_num==.
replace euklems_num =24 if jbsic92==5550	& euklems_num==.
replace euklems_num =24 if jbsic92==5551	& euklems_num==.
replace euklems_num =24 if jbsic92==5552	& euklems_num==.
replace euklems_num =24 if jbsic92==5555	& euklems_num==.
replace euklems_num =.  if jbsic92==5655	& euklems_num==.
replace euklems_num =.  if jbsic92==5847	& euklems_num==.
replace euklems_num =22 if jbsic92==6000	& euklems_num==.
replace euklems_num =22 if jbsic92==6010	& euklems_num==.
replace euklems_num =22 if jbsic92==6020	& euklems_num==.
replace euklems_num =22 if jbsic92==6021	& euklems_num==.
replace euklems_num =22 if jbsic92==6022	& euklems_num==.
replace euklems_num =22 if jbsic92==6023	& euklems_num==.
replace euklems_num =22 if jbsic92==6024	& euklems_num==.
replace euklems_num =22 if jbsic92==6030	& euklems_num==.
replace euklems_num =22 if jbsic92==6110	& euklems_num==.
replace euklems_num =22 if jbsic92==6111	& euklems_num==.
replace euklems_num =22 if jbsic92==6112	& euklems_num==.
replace euklems_num =22 if jbsic92==6120	& euklems_num==.
replace euklems_num =22 if jbsic92==6121	& euklems_num==.
replace euklems_num =22 if jbsic92==6160	& euklems_num==.
replace euklems_num =22 if jbsic92==6200	& euklems_num==.
replace euklems_num =22 if jbsic92==6210	& euklems_num==.
replace euklems_num =22 if jbsic92==6211	& euklems_num==.
replace euklems_num =22 if jbsic92==6220	& euklems_num==.
replace euklems_num =22 if jbsic92==6300	& euklems_num==.
replace euklems_num =22 if jbsic92==6310	& euklems_num==.
replace euklems_num =22 if jbsic92==6311	& euklems_num==.
replace euklems_num =22 if jbsic92==6312	& euklems_num==.
replace euklems_num =22 if jbsic92==6320	& euklems_num==.
replace euklems_num =22 if jbsic92==6321	& euklems_num==.
replace euklems_num =22 if jbsic92==6322	& euklems_num==.
replace euklems_num =22 if jbsic92==6323	& euklems_num==.
replace euklems_num =22 if jbsic92==6324	& euklems_num==.
replace euklems_num =22 if jbsic92==6330	& euklems_num==.
replace euklems_num =22 if jbsic92==6331	& euklems_num==.
replace euklems_num =22 if jbsic92==6340	& euklems_num==.
replace euklems_num =23 if jbsic92==6410	& euklems_num==.
replace euklems_num =23 if jbsic92==6411	& euklems_num==.
replace euklems_num =23 if jbsic92==6412	& euklems_num==.
replace euklems_num =27 if jbsic92==6420	& euklems_num==.
replace euklems_num =.  if jbsic92==6480	& euklems_num==.
replace euklems_num =29 if jbsic92==6500	& euklems_num==.
replace euklems_num =29 if jbsic92==6510	& euklems_num==.
replace euklems_num =29 if jbsic92==6511	& euklems_num==.
replace euklems_num =29 if jbsic92==6512	& euklems_num==.
replace euklems_num =29 if jbsic92==6520	& euklems_num==.
replace euklems_num =29 if jbsic92==6521	& euklems_num==.
replace euklems_num =29 if jbsic92==6522	& euklems_num==.
replace euklems_num =29 if jbsic92==6523	& euklems_num==.
replace euklems_num =29 if jbsic92==6525	& euklems_num==.
replace euklems_num =29 if jbsic92==6526	& euklems_num==.
replace euklems_num =29 if jbsic92==6600	& euklems_num==.
replace euklems_num =29 if jbsic92==6601	& euklems_num==.
replace euklems_num =29 if jbsic92==6602	& euklems_num==.
replace euklems_num =29 if jbsic92==6603	& euklems_num==.
replace euklems_num =29 if jbsic92==6610	& euklems_num==.
replace euklems_num =29 if jbsic92==6611	& euklems_num==.
replace euklems_num =29 if jbsic92==6620	& euklems_num==.
replace euklems_num =29 if jbsic92==6700	& euklems_num==.
replace euklems_num =29 if jbsic92==6710	& euklems_num==.
replace euklems_num =29 if jbsic92==6711	& euklems_num==.
replace euklems_num =29 if jbsic92==6712	& euklems_num==.
replace euklems_num =29 if jbsic92==6713	& euklems_num==.
replace euklems_num =29 if jbsic92==6720	& euklems_num==.
replace euklems_num =30 if jbsic92==7000	& euklems_num==.
replace euklems_num =30 if jbsic92==7010	& euklems_num==.
replace euklems_num =30 if jbsic92==7011	& euklems_num==.
replace euklems_num =30 if jbsic92==7012	& euklems_num==.
replace euklems_num =30 if jbsic92==7020	& euklems_num==.
replace euklems_num =30 if jbsic92==7030	& euklems_num==.
replace euklems_num =30 if jbsic92==7031	& euklems_num==.
replace euklems_num =30 if jbsic92==7032	& euklems_num==.
replace euklems_num =30 if jbsic92==7070	& euklems_num==.
replace euklems_num =31 if jbsic92==7100	& euklems_num==.
replace euklems_num =31 if jbsic92==7110	& euklems_num==.
replace euklems_num =31 if jbsic92==7121	& euklems_num==.
replace euklems_num =31 if jbsic92==7122	& euklems_num==.
replace euklems_num =31 if jbsic92==7123	& euklems_num==.
replace euklems_num =31 if jbsic92==7130	& euklems_num==.
replace euklems_num =31 if jbsic92==7132	& euklems_num==.
replace euklems_num =31 if jbsic92==7133	& euklems_num==.
replace euklems_num =31 if jbsic92==7134	& euklems_num==.
replace euklems_num =31 if jbsic92==7140	& euklems_num==.
replace euklems_num =31 if jbsic92==7142	& euklems_num==.
replace euklems_num =28 if jbsic92==7200	& euklems_num==.
replace euklems_num =28 if jbsic92==7210	& euklems_num==.
replace euklems_num =28 if jbsic92==7220	& euklems_num==.
replace euklems_num =28 if jbsic92==7230	& euklems_num==.
replace euklems_num =28 if jbsic92==7240	& euklems_num==.
replace euklems_num =28 if jbsic92==7250	& euklems_num==.
replace euklems_num =28 if jbsic92==7260	& euklems_num==.
replace euklems_num =31 if jbsic92==7300	& euklems_num==.
replace euklems_num =31 if jbsic92==7310	& euklems_num==.
replace euklems_num =31 if jbsic92==7320	& euklems_num==.
replace euklems_num =31 if jbsic92==7330	& euklems_num==.
replace euklems_num =31 if jbsic92==7400	& euklems_num==.
replace euklems_num =31 if jbsic92==7410	& euklems_num==.
replace euklems_num =31 if jbsic92==7411	& euklems_num==.
replace euklems_num =31 if jbsic92==7412	& euklems_num==.
replace euklems_num =31 if jbsic92==7413	& euklems_num==.
replace euklems_num =31 if jbsic92==7414	& euklems_num==.
replace euklems_num =31 if jbsic92==7415	& euklems_num==.
replace euklems_num =31 if jbsic92==7420	& euklems_num==.
replace euklems_num =31 if jbsic92==7430	& euklems_num==.
replace euklems_num =31 if jbsic92==7440	& euklems_num==.
replace euklems_num =31 if jbsic92==7450	& euklems_num==.
replace euklems_num =31 if jbsic92==7460	& euklems_num==.
replace euklems_num =31 if jbsic92==7462	& euklems_num==.
replace euklems_num =31 if jbsic92==7470	& euklems_num==.
replace euklems_num =31 if jbsic92==7480	& euklems_num==.
replace euklems_num =31 if jbsic92==7481	& euklems_num==.
replace euklems_num =31 if jbsic92==7482	& euklems_num==.
replace euklems_num =31 if jbsic92==7483	& euklems_num==.
replace euklems_num =31 if jbsic92==7484	& euklems_num==.
replace euklems_num =31 if jbsic92==7486	& euklems_num==.
replace euklems_num =31 if jbsic92==7487	& euklems_num==.
replace euklems_num =33 if jbsic92==7500	& euklems_num==.
replace euklems_num =33 if jbsic92==7510	& euklems_num==.
replace euklems_num =33 if jbsic92==7511	& euklems_num==.
replace euklems_num =33 if jbsic92==7512	& euklems_num==.
replace euklems_num =33 if jbsic92==7513	& euklems_num==.
replace euklems_num =33 if jbsic92==7514	& euklems_num==.
replace euklems_num =33 if jbsic92==7520	& euklems_num==.
replace euklems_num =33 if jbsic92==7521	& euklems_num==.
replace euklems_num =33 if jbsic92==7522	& euklems_num==.
replace euklems_num =33 if jbsic92==7523	& euklems_num==.
replace euklems_num =33 if jbsic92==7524	& euklems_num==.
replace euklems_num =33 if jbsic92==7525	& euklems_num==.
replace euklems_num =33 if jbsic92==7530	& euklems_num==.
replace euklems_num =33 if jbsic92==7540	& euklems_num==.
replace euklems_num =33 if jbsic92==7551	& euklems_num==.
replace euklems_num =.  if jbsic92==7700	& euklems_num==.
replace euklems_num =.  if jbsic92==7811	& euklems_num==.
replace euklems_num =.  if jbsic92==7902	& euklems_num==.
replace euklems_num =34 if jbsic92==8000	& euklems_num==.
replace euklems_num =34 if jbsic92==8010	& euklems_num==.
replace euklems_num =34 if jbsic92==8011	& euklems_num==.
replace euklems_num =34 if jbsic92==8020	& euklems_num==.
replace euklems_num =34 if jbsic92==8021	& euklems_num==.
replace euklems_num =34 if jbsic92==8022	& euklems_num==.
replace euklems_num =34 if jbsic92==8024	& euklems_num==.
replace euklems_num =34 if jbsic92==8030	& euklems_num==.
replace euklems_num =34 if jbsic92==8031	& euklems_num==.
replace euklems_num =34 if jbsic92==8032	& euklems_num==.
replace euklems_num =34 if jbsic92==8033	& euklems_num==.
replace euklems_num =34 if jbsic92==8036	& euklems_num==.
replace euklems_num =34 if jbsic92==8040	& euklems_num==.
replace euklems_num =34 if jbsic92==8041	& euklems_num==.
replace euklems_num =34 if jbsic92==8042	& euklems_num==.
replace euklems_num =.  if jbsic92==8150	& euklems_num==.
replace euklems_num =.  if jbsic92==8220	& euklems_num==.
replace euklems_num =.  if jbsic92==8232	& euklems_num==.
replace euklems_num =.  if jbsic92==8350	& euklems_num==.
replace euklems_num =.  if jbsic92==8395	& euklems_num==.
replace euklems_num =.  if jbsic92==8432	& euklems_num==.
replace euklems_num =.  if jbsic92==8480	& euklems_num==.
replace euklems_num =35 if jbsic92==8500	& euklems_num==.
replace euklems_num =35 if jbsic92==8510	& euklems_num==.
replace euklems_num =35 if jbsic92==8511	& euklems_num==.
replace euklems_num =35 if jbsic92==8512	& euklems_num==.
replace euklems_num =35 if jbsic92==8513	& euklems_num==.
replace euklems_num =35 if jbsic92==8514	& euklems_num==.
replace euklems_num =35 if jbsic92==8515	& euklems_num==.
replace euklems_num =35 if jbsic92==8520	& euklems_num==.
replace euklems_num =35 if jbsic92==8530	& euklems_num==.
replace euklems_num =35 if jbsic92==8531	& euklems_num==.
replace euklems_num =35 if jbsic92==8532	& euklems_num==.
replace euklems_num =.  if jbsic92==8611	& euklems_num==.
replace euklems_num =.  if jbsic92==8632	& euklems_num==.
replace euklems_num =.  if jbsic92==8951	& euklems_num==.
replace euklems_num =.  if jbsic92==9000	& euklems_num==.
replace euklems_num =38 if jbsic92==9110	& euklems_num==.
replace euklems_num =38 if jbsic92==9111	& euklems_num==.
replace euklems_num =38 if jbsic92==9112	& euklems_num==.
replace euklems_num =38 if jbsic92==9120	& euklems_num==.
replace euklems_num =38 if jbsic92==9130	& euklems_num==.
replace euklems_num =38 if jbsic92==9131	& euklems_num==.
replace euklems_num =38 if jbsic92==9132	& euklems_num==.
replace euklems_num =38 if jbsic92==9133	& euklems_num==.
replace euklems_num =38 if jbsic92==9140	& euklems_num==.
replace euklems_num =38 if jbsic92==9150	& euklems_num==.
replace euklems_num =37 if jbsic92==9200	& euklems_num==.
replace euklems_num =37 if jbsic92==9210	& euklems_num==.
replace euklems_num =37 if jbsic92==9211	& euklems_num==.
replace euklems_num =37 if jbsic92==9212	& euklems_num==.
replace euklems_num =37 if jbsic92==9213	& euklems_num==.
replace euklems_num =37 if jbsic92==9220	& euklems_num==.
replace euklems_num =37 if jbsic92==9230	& euklems_num==.
replace euklems_num =37 if jbsic92==9231	& euklems_num==.
replace euklems_num =37 if jbsic92==9232	& euklems_num==.
replace euklems_num =37 if jbsic92==9233	& euklems_num==.
replace euklems_num =37 if jbsic92==9234	& euklems_num==.
replace euklems_num =37 if jbsic92==9240	& euklems_num==.
replace euklems_num =37 if jbsic92==9250	& euklems_num==.
replace euklems_num =37 if jbsic92==9251	& euklems_num==.
replace euklems_num =37 if jbsic92==9252	& euklems_num==.
replace euklems_num =37 if jbsic92==9253	& euklems_num==.
replace euklems_num =37 if jbsic92==9260	& euklems_num==.
replace euklems_num =37 if jbsic92==9261	& euklems_num==.
replace euklems_num =37 if jbsic92==9262	& euklems_num==.
replace euklems_num =37 if jbsic92==9270	& euklems_num==.
replace euklems_num =37 if jbsic92==9271	& euklems_num==.
replace euklems_num =37 if jbsic92==9272	& euklems_num==.
replace euklems_num =38 if jbsic92==9300	& euklems_num==.
replace euklems_num =38 if jbsic92==9301	& euklems_num==.
replace euklems_num =38 if jbsic92==9302	& euklems_num==.
replace euklems_num =38 if jbsic92==9303	& euklems_num==.
replace euklems_num =38 if jbsic92==9304	& euklems_num==.
replace euklems_num =38 if jbsic92==9305	& euklems_num==.
replace euklems_num =38 if jbsic92==9310	& euklems_num==.
replace euklems_num =38 if jbsic92==9320	& euklems_num==.
replace euklems_num =38 if jbsic92==9330	& euklems_num==.
replace euklems_num =.  if jbsic92==9420	& euklems_num==.
replace euklems_num =.  if jbsic92==9470	& euklems_num==.
replace euklems_num =39 if jbsic92==9500	& euklems_num==.
replace euklems_num =39 if jbsic92==9510	& euklems_num==.
replace euklems_num =39 if jbsic92==9511	& euklems_num==.
replace euklems_num =39 if jbsic92==9611	& euklems_num==.
replace euklems_num =.  if jbsic92==9660	& euklems_num==.
replace euklems_num =40 if jbsic92==9900	& euklems_num==.
replace euklems_num =40 if jbsic92==9911	& euklems_num==.
replace euklems_num =40 if jbsic92==9990	& euklems_num==.
replace euklems_num =40 if jbsic92==9998	& euklems_num==.
replace euklems_num =40 if jbsic92==9999	& euklems_num==.

mdesc euklems_num


***Adding industry variables based on jbsic92_crosswalked

* merge SIC crosswalk to get variable "jbsic92_crosswalked"
merge m:m jbsic using "replication_data/SIC1980_SIC1992_crosswalk.dta"
drop if _merge==2
drop _merge


replace euklems_num =1 if jbsic92_crosswalked==111 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==112 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==113 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==120 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==121 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==122 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==123 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==124 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==125 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==130 & euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==140 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==141 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==142 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==150 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==201 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==202 & euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==410 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==500 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==501 & euklems_num==.
replace euklems_num =1 if jbsic92_crosswalked==502 & euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==802 & euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==810 & euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==853 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1000 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1010 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1020 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1030 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1100 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1110 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1120 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1400 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1410 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1411 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1412 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1421 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1422 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1430 & euklems_num==.
replace euklems_num =2 if jbsic92_crosswalked==1450 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1500 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1510 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1511 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1512 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1513 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1520 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1526 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1530 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1531 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1532 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1533 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1540 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1541 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1542 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1543 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1550 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1551 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1552 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1553 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1561 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1570 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1571 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1580 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1581 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1582 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1583 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1584 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1585 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1586 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1587 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1588 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1589 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1590 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1591 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1593 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1594 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1596 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1597 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1598 & euklems_num==.
replace euklems_num =4 if jbsic92_crosswalked==1600 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1700 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1710 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1711 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1712 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1715 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1716 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1717 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1720 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1721 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1722 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1725 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1730 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1740 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1743 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1750 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1751 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1752 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1754 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1760 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1770 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1771 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1772 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1800 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1810 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1820 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1821 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1822 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1823 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1824 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1900 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1910 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1920 & euklems_num==.
replace euklems_num =5 if jbsic92_crosswalked==1930 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2000 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2010 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2020 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2030 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2040 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2050 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2051 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2052 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2100 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2110 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2111 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2112 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2120 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2121 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2122 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2123 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2124 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2125 & euklems_num==.
replace euklems_num =6 if jbsic92_crosswalked==2200 & euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==2210 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2211 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2212 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2213 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2214 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2215 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2220 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2221 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2222 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2223 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2224 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2225 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2230 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2231 & euklems_num==.
replace euklems_num =26 if jbsic92_crosswalked==2233 & euklems_num==.
replace euklems_num =7 if jbsic92_crosswalked==2310 & euklems_num==.
replace euklems_num =7 if jbsic92_crosswalked==2320 & euklems_num==.
replace euklems_num =7 if jbsic92_crosswalked==2330 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2400 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2410 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2411 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2412 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2413 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2414 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2415 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2416 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2417 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2420 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2421 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2424 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2430 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2437 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2440 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2441 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2442 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2450 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2451 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2452 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2460 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2461 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2462 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2463 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2464 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2465 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2466 & euklems_num==.
replace euklems_num =8 if jbsic92_crosswalked==2470 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2500 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2510 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2511 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2513 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2514 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2520 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2521 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2522 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2523 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2524 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2560 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2600 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2610 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2611 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2612 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2613 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2614 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2615 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2620 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2621 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2622 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2623 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2625 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2626 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2630 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2640 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2650 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2651 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2653 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2660 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2661 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2662 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2663 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2665 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2666 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2670 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2680 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2681 & euklems_num==.
replace euklems_num =9 if jbsic92_crosswalked==2682 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2700 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2710 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2720 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2721 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2722 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2724 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2731 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2732 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2733 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2734 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2740 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2741 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2742 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2743 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2744 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2745 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2750 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2751 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2752 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2753 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2754 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2800 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2810 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2811 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2812 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2820 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2821 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2822 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2830 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2840 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2850 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2851 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2852 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2860 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2861 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2862 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2863 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2870 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2871 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2872 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2873 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2874 & euklems_num==.
replace euklems_num =10 if jbsic92_crosswalked==2875 & euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2900 & euklems_num==.

replace euklems_num =12 if jbsic92_crosswalked==2910	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2911	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2912	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2913	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2914	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2920	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2921	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2922	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2923	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2924	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2930	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2931	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2932	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2940	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2941	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2950	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2951	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2952	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2953	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2954	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2955	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2956	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2960	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2970	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2971	& euklems_num==.
replace euklems_num =12 if jbsic92_crosswalked==2972	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3000	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3001	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3002	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3021	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3100	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3110	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3113	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3120	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3130	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3140	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3150	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3160	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3161	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3162	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3200	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3210	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3220	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3230	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3284	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3300	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3301	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3310	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3320	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3330	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3340	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3341	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3343	& euklems_num==.
replace euklems_num =11 if jbsic92_crosswalked==3350	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3400	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3410	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3420	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3421	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3430	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3510	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3511	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3512	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3520	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3530	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3541	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3542	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3543	& euklems_num==.
replace euklems_num =13 if jbsic92_crosswalked==3550	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3600	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3610	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3611	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3612	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3613	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3614	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3615	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3621	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3622	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3630	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3640	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3650	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3652	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3660	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3661	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3662	& euklems_num==.
replace euklems_num =14 if jbsic92_crosswalked==3663	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==3700	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==3710	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==3720	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==4000	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==4010	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==4012	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==4020	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==4030	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==4100	& euklems_num==.
replace euklems_num =15 if jbsic92_crosswalked==4248	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4500	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4510	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4511	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4512	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4520	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4521	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4522	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4523	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4524	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4525	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4530	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4531	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4532	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4533	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4534	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4540	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4541	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4542	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4543	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4544	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4545	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4550	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4630	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4754	& euklems_num==.
replace euklems_num =16 if jbsic92_crosswalked==4812	& euklems_num==.
replace euklems_num =18 if jbsic92_crosswalked==5000	& euklems_num==.
replace euklems_num =18 if jbsic92_crosswalked==5010	& euklems_num==.
replace euklems_num =18 if jbsic92_crosswalked==5020	& euklems_num==.
replace euklems_num =18 if jbsic92_crosswalked==5030	& euklems_num==.
replace euklems_num =18 if jbsic92_crosswalked==5040	& euklems_num==.
replace euklems_num =18 if jbsic92_crosswalked==5050	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5100	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5110	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5111	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5112	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5113	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5114	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5115	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5116	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5117	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5118	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5119	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5120	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5121	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5122	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5123	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5130	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5131	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5132	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5133	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5134	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5135	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5136	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5137	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5138	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5139	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5140	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5141	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5142	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5143	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5144	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5145	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5146	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5147	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5150	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5151	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5152	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5153	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5154	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5155	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5156	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5157	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5160	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5161	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5162	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5163	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5164	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5165	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5166	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5170	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5187	& euklems_num==.
replace euklems_num =19 if jbsic92_crosswalked==5190	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5200	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5210	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5211	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5212	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5217	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5220	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5221	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5222	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5223	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5224	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5225	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5226	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5227	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5230	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5231	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5232	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5233	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5240	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5241	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5242	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5243	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5244	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5245	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5246	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5247	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5248	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5250	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5252	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5260	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5261	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5262	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5263	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5270	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5271	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5272	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5273	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5274	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5333	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5420	& euklems_num==.
replace euklems_num =20 if jbsic92_crosswalked==5450	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5500	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5510	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5511	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5512	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5520	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5521	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5522	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5523	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5530	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5531	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5532	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5533	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5540	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5542	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5550	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5551	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5552	& euklems_num==.
replace euklems_num =24 if jbsic92_crosswalked==5555	& euklems_num==.
replace euklems_num =.  if jbsic92_crosswalked==5655	& euklems_num==.
replace euklems_num =.  if jbsic92_crosswalked==5847	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6000	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6010	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6020	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6021	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6022	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6023	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6024	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6030	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6110	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6111	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6112	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6120	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6121	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6160	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6200	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6210	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6211	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6220	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6300	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6310	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6311	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6312	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6320	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6321	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6322	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6323	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6324	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6330	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6331	& euklems_num==.
replace euklems_num =22 if jbsic92_crosswalked==6340	& euklems_num==.
replace euklems_num =23 if jbsic92_crosswalked==6410	& euklems_num==.
replace euklems_num =23 if jbsic92_crosswalked==6411	& euklems_num==.
replace euklems_num =23 if jbsic92_crosswalked==6412	& euklems_num==.
replace euklems_num =27 if jbsic92_crosswalked==6420	& euklems_num==.
replace euklems_num =.  if jbsic92_crosswalked==6480	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6500	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6510	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6511	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6512	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6520	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6521	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6522	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6523	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6525	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6526	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6600	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6601	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6602	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6603	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6610	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6611	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6620	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6700	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6710	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6711	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6712	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6713	& euklems_num==.
replace euklems_num =29 if jbsic92_crosswalked==6720	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7000	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7010	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7011	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7012	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7020	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7030	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7031	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7032	& euklems_num==.
replace euklems_num =30 if jbsic92_crosswalked==7070	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7100	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7110	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7121	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7122	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7123	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7130	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7132	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7133	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7134	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7140	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7142	& euklems_num==.
replace euklems_num =28 if jbsic92_crosswalked==7200	& euklems_num==.
replace euklems_num =28 if jbsic92_crosswalked==7210	& euklems_num==.
replace euklems_num =28 if jbsic92_crosswalked==7220	& euklems_num==.
replace euklems_num =28 if jbsic92_crosswalked==7230	& euklems_num==.
replace euklems_num =28 if jbsic92_crosswalked==7240	& euklems_num==.
replace euklems_num =28 if jbsic92_crosswalked==7250	& euklems_num==.
replace euklems_num =28 if jbsic92_crosswalked==7260	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7300	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7310	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7320	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7330	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7400	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7410	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7411	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7412	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7413	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7414	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7415	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7420	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7430	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7440	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7450	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7460	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7462	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7470	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7480	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7481	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7482	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7483	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7484	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7486	& euklems_num==.
replace euklems_num =31 if jbsic92_crosswalked==7487	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7500	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7510	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7511	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7512	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7513	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7514	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7520	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7521	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7522	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7523	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7524	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7525	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7530	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7540	& euklems_num==.
replace euklems_num =33 if jbsic92_crosswalked==7551	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==7700	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==7811	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==7902	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8000	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8010	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8011	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8020	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8021	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8022	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8024	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8030	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8031	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8032	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8033	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8036	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8040	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8041	& euklems_num==.
replace euklems_num =34 if jbsic92_crosswalked==8042	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8150	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8220	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8232	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8350	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8395	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8432	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8480	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8500	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8510	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8511	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8512	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8513	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8514	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8515	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8520	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8530	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8531	& euklems_num==.
replace euklems_num =35 if jbsic92_crosswalked==8532	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8611	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8632	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==8951	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==9000	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9110	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9111	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9112	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9120	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9130	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9131	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9132	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9133	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9140	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9150	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9200	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9210	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9211	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9212	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9213	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9220	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9230	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9231	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9232	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9233	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9234	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9240	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9250	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9251	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9252	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9253	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9260	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9261	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9262	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9270	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9271	& euklems_num==.
replace euklems_num =37 if jbsic92_crosswalked==9272	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9300	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9301	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9302	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9303	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9304	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9305	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9310	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9320	& euklems_num==.
replace euklems_num =38 if jbsic92_crosswalked==9330	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==9420	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==9470	& euklems_num==.
replace euklems_num =39 if jbsic92_crosswalked==9500	& euklems_num==.
replace euklems_num =39 if jbsic92_crosswalked==9510	& euklems_num==.
replace euklems_num =39 if jbsic92_crosswalked==9511	& euklems_num==.
replace euklems_num =39 if jbsic92_crosswalked==9611	& euklems_num==.
replace euklems_num =. if jbsic92_crosswalked==9660	& euklems_num==.
replace euklems_num =40 if jbsic92_crosswalked==9900	& euklems_num==.
replace euklems_num =40 if jbsic92_crosswalked==9911	& euklems_num==.
replace euklems_num =40 if jbsic92_crosswalked==9990	& euklems_num==.
replace euklems_num =40 if jbsic92_crosswalked==9998	& euklems_num==.
replace euklems_num =40 if jbsic92_crosswalked==9999	& euklems_num==.


* for remaining years (1998, 1999, 2000)
* use crosswalked industry code (sic80->sic92)
* no 1:1 mapping possible. collapse into 2-digit version. 

gen sic8092_2d = jbsic 
* from warwick source.
* sic80_to_sic92_mappings_revised_13october2016-1.xls, column J
recode sic8092_2d ///
(100=1) ///
(200=2) ///
(300=5) ///
(1113=10) (1114=10) (1115=45) (1200=23) (1300=11) (1401=23) (1402=23) (1520=23) (1610=40) (1620=40) (1630=29) (1700=41) ///
(2100=13) (2210=27) (2220=27) (2234=28) (2235=27) (2245=27) (2246=27) (2247=27) (2310=14) (2330=24) (2396=14) (2410=26) (2420=26) (2436=26) (2437=26) (2440=26) (2450=26) (2460=26) (2471=26) (2478=26) (2479=26) (2481=26) (2489=26) ///
(2511=24) (2512=24) (2513=24) (2514=24) (2515=24) (2516=24) (2551=24) (2552=24) (2562=24) (2564=24) (2565=24) (2567=24) (2568=24) (2569=25) (2570=24) (2581=24) (2582=24) (2591=24) (2599=24) ///
(2600=24) ///
(3111=27) (3112=27) (3120=28) (3137=28) (3138=28) (3142=28) (3161=28) (3162=28) (3163=28) (3164=28) (3165=29) (3166=36) (3167=28) (3169=28) ///
(3204=28) (3205=28) (3211=51) (3212=29) (3221=29) (3222=29) (3230=29) (3244=29) (3245=29) (3246=45) (3251=29) (3254=29) (3255=29) (3261=29) (3262=29) (3275=29) (3276=22) (3281=29) (3283=29) (3284=29) (3285=29) (3286=29) (3287=29) (3288=29) (3289=28) (3290=29) ///
(3301=30) (3302=30) ///
(3410=31) (3420=31) (3432=31) (3433=31) (3434=31) (3435=29) (3441=32) (3442=31) (3443=33) (3444=32) (3452=22) (3453=32) (3454=31) (3460=29) (3470=31) (3480=45) ///
(3510=34) (3521=34) (3522=34) (3523=34) (3530=34) ///
(3610=35) (3620=35) (3633=34) (3634=35) (3640=35) (3650=36) ///
(3710=33) (3720=33) (3731=33) (3732=33) (3733=33) (3740=33) ///
(4415=15) (4416=15) ///
(4121=15) (4122=15) (4123=15) (4126=15) (4130=15) (4147=15) (4150=15) (4160=15) (4180=85) (4196=15) (4197=15) ///
(4200=15) (4213=15) (4214=15) (4221=15) (4222=15) (4239=15) (4240=15) (4261=15) (4270=15) (4283=15) (4290=16) ///
(4310=17) (4321=17) (4322=17) (4350=17) (4363=17) (4370=17) (4384=17) (4385=17) (4395=17) (4396=17) (4398=17) (4399=17) ///
(4410=19) (4420=19) ///
(4510=19) (4531=18) (4532=18) (4533=18) (4534=18) (4535=18) (4536=18) (4537=18) (4538=18) (4539=18) (4555=17) (4556=17) (4557=17) ///
(4610=20) (4620=20) (4630=45) (4640=20) (4650=45) (4663=36) (4664=74) (4671=36) (4672=45) ///
(4710=21) (4721=21) (4722=21) (4723=21) (4724=21) (4725=21) (4728=21) (4751=22) (4752=22) (4753=22) (4754=22) ///
(4811=25) (4812=25) (4820=25) (4831=17) (4832=25) (4833=25) (4834=25) (4835=25) (4836=25) ///
(4910=36) (4920=36) (4930=74) (4941=36) (4942=36) (4954=36) (4959=25) ///
(5000=45) ///
(6148=50) (6110=51) ///
(6210=51) ///
(6300=51) ///
(6510=50) ///
(6410=52) ///
(6611=55) (6612=55) (6620=55) (6630=91) (6640=55) (6650=55) (6670=55) ///
(6710=50) (6720=52) (6730=52) ///
(7100=60) ///
(7210=60) (7220=60) (7230=60) (7260=63) ///
(7400=61) ///
(7500=63) ///
(7610=63) (7630=63) (7640=63) ///
(7700=63) ///
(7901=64) (7902=64) ///
(8140=65) (8150=65) ///
(8200=67) ///
(8310=65) (8320=67) (8340=70) (8350=74) (8360=74) (8370=74) (8380=74) (8394=72) (8395=74) (8396=74) ///
(8410=71) (8420=71) (8430=71) (8460=71) (8480=71) (8490=71) ///
(8500=70) ///
(9111=75) (9112=75) (9120=75) (9130=75) (9140=75) (9150=75) (9190=75) ///
(9211=90) (9212=90) (9230=74) ///
(9310=80) (9330=80) (9360=80) ///
(9400=73) ///
(9510=85) (9520=85) (9530=85) (9540=85) (9550=85) (9560=85) ///
(9611=85) (9631=91) (9660=91) (9690=91) ///
(9711=92) (9741=92) (9760=92) (9770=92) (9791=92) ///
(9811=93) (9812=93) (9820=93) (9890=74) ///
(9900=95)


* use us-uk80-uk92 crosswalk for rest

* some cases are not possible to transfer to sic92. replace with missing.
* mostly very low number of respondents per sic code, usually 1-3

replace sic8092_2d=. if sic8092_2d<0 | sic8092_2d>100

* use this crosswalked version of jbsic80 to complete missing years

replace euklems_num =1 if   sic8092_2d==1	& euklems_num==.
replace euklems_num =1 if   sic8092_2d==2	& euklems_num==.
replace euklems_num =15 if   sic8092_2d==4	& euklems_num==.
replace euklems_num =1 if   sic8092_2d==5	& euklems_num==.
replace euklems_num =34 if   sic8092_2d==8	& euklems_num==.
replace euklems_num =2 if   sic8092_2d==10	& euklems_num==.
replace euklems_num =2 if   sic8092_2d==11	& euklems_num==.
replace euklems_num =2 if   sic8092_2d==14	& euklems_num==.
replace euklems_num =4 if   sic8092_2d==15	& euklems_num==.
replace euklems_num =4 if   sic8092_2d==16	& euklems_num==.
replace euklems_num =5 if   sic8092_2d==17	& euklems_num==.
replace euklems_num =5 if   sic8092_2d==18	& euklems_num==.
replace euklems_num =5 if   sic8092_2d==19	& euklems_num==.
replace euklems_num =6 if   sic8092_2d==20	& euklems_num==.
replace euklems_num =6 if   sic8092_2d==21	& euklems_num==.
replace euklems_num =26 if   sic8092_2d==22	& euklems_num==.
replace euklems_num =7 if   sic8092_2d==23	& euklems_num==.
replace euklems_num =8 if   sic8092_2d==24	& euklems_num==.
replace euklems_num =9 if   sic8092_2d==25	& euklems_num==.
replace euklems_num =9 if   sic8092_2d==26	& euklems_num==.
replace euklems_num =10 if   sic8092_2d==27	& euklems_num==.
replace euklems_num =10 if   sic8092_2d==28	& euklems_num==.
replace euklems_num =12 if   sic8092_2d==29	& euklems_num==.
replace euklems_num =11 if   sic8092_2d==30	& euklems_num==.
replace euklems_num =11 if   sic8092_2d==31	& euklems_num==.
replace euklems_num =11 if   sic8092_2d==32	& euklems_num==.
replace euklems_num =11 if   sic8092_2d==33	& euklems_num==.
replace euklems_num =13 if   sic8092_2d==34	& euklems_num==.
replace euklems_num =13 if   sic8092_2d==35	& euklems_num==.
replace euklems_num =14 if   sic8092_2d==36	& euklems_num==.
replace euklems_num =15 if   sic8092_2d==37	& euklems_num==.
replace euklems_num =15 if   sic8092_2d==40	& euklems_num==.
replace euklems_num =15 if   sic8092_2d==41	& euklems_num==.
replace euklems_num =15 if   sic8092_2d==42	& euklems_num==.
replace euklems_num =16 if   sic8092_2d==45	& euklems_num==.
replace euklems_num =16 if   sic8092_2d==46	& euklems_num==.
replace euklems_num =16 if   sic8092_2d==47	& euklems_num==.
replace euklems_num =16 if   sic8092_2d==48	& euklems_num==.
replace euklems_num =18 if   sic8092_2d==50	& euklems_num==.
replace euklems_num =19 if   sic8092_2d==51	& euklems_num==.
replace euklems_num =20 if   sic8092_2d==52	& euklems_num==.
replace euklems_num =20 if   sic8092_2d==53	& euklems_num==.
replace euklems_num =20 if   sic8092_2d==54	& euklems_num==.
replace euklems_num =24 if   sic8092_2d==55	& euklems_num==.
replace euklems_num =. if   sic8092_2d==56	& euklems_num==.
replace euklems_num =. if   sic8092_2d==58	& euklems_num==.
replace euklems_num =22 if   sic8092_2d==60	& euklems_num==.
replace euklems_num =22 if   sic8092_2d==61	& euklems_num==.
replace euklems_num =22 if   sic8092_2d==62	& euklems_num==.
replace euklems_num =22 if   sic8092_2d==63	& euklems_num==.
*replace euklems_num =23 if   sic8092_2d==6410	& euklems_num==.
*replace euklems_num =23 if   sic8092_2d==6411	& euklems_num==.
*replace euklems_num =23 if   sic8092_2d==6412	& euklems_num==.
*replace euklems_num =27 if   sic8092_2d==6420	& euklems_num==.
*replace euklems_num =. if   sic8092_2d==6480	& euklems_num==.
replace euklems_num =. if   sic8092_2d==64 & euklems_num==. /* unclear, could be post (23) or telecommunications (27). missing = be on the safe side */	
replace euklems_num =29 if   sic8092_2d==65	& euklems_num==.
replace euklems_num =29 if   sic8092_2d==66	& euklems_num==.
replace euklems_num =29 if   sic8092_2d==67	& euklems_num==.
replace euklems_num =30 if   sic8092_2d==70	& euklems_num==.
replace euklems_num =31 if   sic8092_2d==71	& euklems_num==.
replace euklems_num =28 if   sic8092_2d==72	& euklems_num==.
replace euklems_num =31 if   sic8092_2d==73	& euklems_num==.
replace euklems_num =31 if   sic8092_2d==74	& euklems_num==.
replace euklems_num =33 if   sic8092_2d==75	& euklems_num==.
replace euklems_num =. if   sic8092_2d==77	& euklems_num==.
replace euklems_num =. if   sic8092_2d==78	& euklems_num==.
replace euklems_num =. if   sic8092_2d==79	& euklems_num==.
replace euklems_num =34 if   sic8092_2d==80	& euklems_num==.
replace euklems_num =. if   sic8092_2d==81	& euklems_num==.
replace euklems_num =. if   sic8092_2d==82	& euklems_num==.
replace euklems_num =. if   sic8092_2d==83	& euklems_num==.
replace euklems_num =. if   sic8092_2d==84	& euklems_num==.
replace euklems_num =35 if   sic8092_2d==85	& euklems_num==.
replace euklems_num =. if   sic8092_2d==86	& euklems_num==.
replace euklems_num =. if   sic8092_2d==89	& euklems_num==.
replace euklems_num =. if   sic8092_2d==90	& euklems_num==.
replace euklems_num =38 if   sic8092_2d==91	& euklems_num==.
replace euklems_num =37 if   sic8092_2d==92	& euklems_num==.
replace euklems_num =38 if   sic8092_2d==93	& euklems_num==.
replace euklems_num =. if   sic8092_2d==94	& euklems_num==.
replace euklems_num =39 if   sic8092_2d==95	& euklems_num==.
replace euklems_num =. if   sic8092_2d==96	& euklems_num==.
replace euklems_num =40 if   sic8092_2d==99	& euklems_num==.

replace euklems_num = . if inlist(euklems_num, 39, 40) // remove industries with zero variation in ICT

*-------------------------------------------------------------------------------------------------------------
* MERGE ON ICT DATA from EUKLEMS
*-------------------------------------------------------------------------------------------------------------

*** ICT UK
merge m:1 euklems_num year using replication_data/temporary_files/merged_euklems.dta, gen(match_euklems)
drop if match_euklems==2 // master only: before 1997 (34'000) and missing euklems_num (243'000)
//Extended ICT from EUROSTAT for year of 2017
merge m:1 euklems_num year using replication_data/ICT_eurostat.dta, gen(match_ict_eurostat)
drop if match_ict_eurostat == 2
drop match_ict_eurostat


*** ICT USA (instrumental variable approach)
merge m:1 euklems_num year using replication_data/merged_euklems_USA.dta, gen(match_euklems_USA)
drop if match_euklems_USA==2
drop match_euklems_USA


gen ICT_USA = ICT_nummerator_USA / EMPE //ICT capitalstock USA normalized by hours worked in the UK as in Colantone and Stanig
label var ICT_USA "ICT stock USA / workers in UK"
drop ICT_nummerator_USA

// Prepare instrumental variable approach
tabulate edu, gen(edu_) 
foreach v in ICT ICT_USA {
	forvalues i = 1/6{
		gen `v'__`i'    = `v' * edu_`i'	
		local vtext : variable label edu_`i'
		label var `v'__`i' "`vtext'"
		}
	}

	
*** LABEL INDUSTRY GROUPS (euklems_num)
label define euklems_num  ///
1	 "AGRICULTURE, FISHING" ///
2	 "MINING AND QUARRYING" ///
3	 "TOTAL MANUFACTURING" ///
4	 "Food, beverages, tobacco" ///
5	 "Textiles, leather " ///
6	 "Wood, paper, printing" ///
7	 "Coke, refined petroleum" ///
8	 "Chemicals" ///
9	 "Rubber and plastics" ///
10	 "Metals" ///
11	 "Electrical and optical" ///
12	 "Machinery n.e.c." ///
13	 "Transport equipment" ///
14	 "Other manufacturing" ///
15	 "ELECTR., GAS, WATER" /// 
16	 "CONSTRUCTION" ///
17	 "TRADE AND MOTOR" ///
18	 "Motor vehicles" ///
19	 "Wholesale trade" ///
20	 "Retail trade" ///
21	 "TRANSPORT, STORAGE" ///
22	 "Transport, storage" ///
23	 "Post and courier" ///
24	 "ACCOMMODATION, FOOD" ///
25	 "INFO. & COMMUNICATION" ///
26	 "Publishing, audiovisual" ///
27	 "Telecommunications" ///
28	 "Information technology" ///
29	 "FINANCE AND INSURANCE" ///
30	 "REAL ESTATE" ///
31	 "PROFESSIONAL, ADMIN." ///
32	 "COMMUNITY, SOCIAL" ///
33	 "Public adm. and defence" ///
34	 "Education" ///
35	 "Health and social work" ///
36	 "ARTS, RECREATION" ///
37	 "Arts, recreation" ///
38	 "Other services" ///
39	 "Households as employers" ///
40	 "Extraterritorial org." ///
, modify

label values euklems_num euklems_num
label var euklems_num "Industry ID from EUKELMS."



*-------------------------------------------------------------------------------------------------------------
* TRADE 
*-------------------------------------------------------------------------------------------------------------
// add trade data from COMTRADE

merge m:1 euklems_num year using replication_data/temporary_files/imports.dta, gen(match_trade)
drop if match_trade==2 /* year 2016 */
replace imports = imports / EMPE
label var imports "Imports in goods from China (in 1000 GBP per worker)"

* master only: total 527.000 (=91%!)
* 243,345 because euklems missing
* 56'000 because pre-1997
* rest because no data (non-tradable sectors, only data for euklems 2-51, excl. 16 18)

* among tradable sectors, matching works well:
tab match_trade if euklems_num<19&euklems_num!=1&euklems_num!=16&euklems_num!=15&euklems_num!=.&year>1996



*-------------------------------------------------------------------------------------------------------------
* RTI
*-------------------------------------------------------------------------------------------------------------
* OCCUPATIONAL CODES; TASK GROUPS (ISCO-BASED)
rename jbisco88_cc isco88_3d
replace isco88_3d = . if isco88_3d<0

//merge on routine task intensity through occupations
merge m:1 isco88_3d using "replication_data/temporary_files/merge_onet2003-isco88_3d.dta"
drop if _merge == 2
drop _merge

* RTI:  HIGH LOW FOR COMPLETE SAMPLE
xtile high_rti = rti_3d, nquantiles(2)
replace high_rti = high_rti - 1
label var high_rti "Above median RTI"
label define rti_label 0 "low RTI" 1 "high RTI"
label values high_rti rti_label



*-------------------------------------------------------------------------------------------------------------
* ADDITIONAL VARIABLES
*-------------------------------------------------------------------------------------------------------------


*** LEADS --> year of next interview 
foreach variable in   incomem hourly_wage unemployed F_unemployed voted cons labour ukip libdem incumbent {
	bysort id (year): gen F_`variable' = `variable'[_n+1]
	label var F_`variable' "Lead (next interview)" 
	}
replace F_unemp = . if unemp == 1 // currently unemployed cannot lose job
label var F_unemployed "Probability to become unemployed"


*** ATTRITION
gen attr_sample = 1
bysort id (year): replace attr_sample = 0 if year == year[_n+1]-1
replace attr_sample = . if year == 2015 | euklems_num == .
label var attr_sample "Drops out before next interview"

gen attr_industry = .
bysort id (year): replace attr_industry = 1 if year == year[_n+1]-1
bysort id (year): replace attr_industry = 0 if euklems_num == euklems_num[_n+1]
replace attr_industry = . if year == 2015 | euklems_num == .
label var attr_industry "Not assigned to industry anymore at next interview"

*** DUMMIES
gen post_2009 = 0
replace post_2009 = 1 if year >2009
label var post_2009 "Dummy=1 if year>2009"

//define panel structure
egen year_region = group(year region)


//create manual dummies for xtivreg2 to work
tab year, gen(year_)
tab region, gen(region_)


*** Industry-spell dummy
// temporarily recode those with missing industry identifier to avoid to create seperate identifiers for each individual
recode euklems_num .=0
egen indxind=group(id euklems_num)
recode euklems_num 0=.
label var indxind "Individual-by-Industry Identifier"

//create cluster var
egen industry_year=group(year euklems_num)



*-------------------------------------------------------------------------------------------------------------
* ORGANIZE THE DATASET
*-------------------------------------------------------------------------------------------------------------
gen __________id=.
order id year indxind, after(__________id)

gen __________political=.
order voted cons labour libdem ukip incumbent, after(__________political)

gen __________industry=.
order euklems_num ICT machinery nonICT ICT_USA imports, after(__________industry)

gen __________socioeconomic=.
order region female immigrant age agesq edu incomem hourly_wage unemployed F_unemployed high_rti, after(__________socioeconomic)

gen __________mechanism=.
order strong_gov_pca social_progressive_pca satlife_imp , after(__________mechanism)

gen __________auxiliary=.
order interview_date attr_sample attr_industry  post_2009 year_region industry_year year_* edu_* region_* ICT__* ICT_USA_* F_incomem F_hourly_wage  F_F_unemployed F_voted F_cons F_labour F_ukip F_libdem F_incumbent, after(__________auxiliary)

keep __________id-F_incumbent


********************************************************************************

save "replication_data/dataset_final.dta", replace

********************************************************************************
********************************************************************************
